<?php



/**
 * This class defines the structure of the 'bonus_goals_forms' table.
 *
 *
 *
 * This map class is used by Propel to do runtime db structure discovery.
 * For example, the createSelectSql() method checks the type of a given column used in an
 * ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
 * (i.e. if it's a text column type).
 *
 * @package    propel.generator.empeval.map
 */
class EmpevalBonusGoalsFormsTableMap extends TableMap
{

    /**
     * The (dot-path) name of this class
     */
    const CLASS_NAME = 'empeval.map.EmpevalBonusGoalsFormsTableMap';

    /**
     * Initialize the table attributes, columns and validators
     * Relations are not initialized by this method since they are lazy loaded
     *
     * @return void
     * @throws PropelException
     */
    public function initialize()
    {
        // attributes
        $this->setName('bonus_goals_forms');
        $this->setPhpName('BonusGoalsForms');
        $this->setClassname('EmpevalBonusGoalsForms');
        $this->setPackage('empeval');
        $this->setUseIdGenerator(true);
        // columns
        $this->addPrimaryKey('ID', 'Id', 'INTEGER', true, 4, null);
        $this->addForeignKey('USER_POSITION_ID', 'UserPositionId', 'INTEGER', 'user_positions', 'ID', true, 4, null);
        $this->addForeignKey('EDITOR_ID', 'EditorId', 'INTEGER', 'users', 'ID', false, 4, null);
        $this->addForeignKey('BONUS_PERIOD_ID', 'BonusPeriodId', 'INTEGER', 'bonus_periods', 'ID', false, 4, null);
        $this->addColumn('YEAR', 'Year', 'SMALLINT', false, 2, null);
        $this->addColumn('TYPE', 'Type', 'TINYINT', true, 1, null);
        $this->addColumn('STATUS', 'Status', 'TINYINT', true, 1, 0);
        $this->addColumn('TMP_STATUS', 'TmpStatus', 'TINYINT', false, 1, null);
        $this->addColumn('COMMENT', 'Comment', 'LONGVARCHAR', false, 2147483647, null);
        $this->addColumn('NO_ACCEPT_REASON', 'NoAcceptReason', 'LONGVARCHAR', false, 2147483647, null);
        $this->addColumn('ACTIVE', 'Active', 'BOOLEAN', true, 1, true);
        $this->addColumn('DELETED_DATE', 'DeletedDate', 'TIMESTAMP', false, 16, null);
        $this->addColumn('LAST_MODIFIED', 'LastModified', 'TIMESTAMP', false, 16, null);
        $this->addColumn('CREATED', 'Created', 'TIMESTAMP', true, 16, '');
        // validators
    } // initialize()

    /**
     * Build the RelationMap objects for this table relationships
     */
    public function buildRelations()
    {
        $this->addRelation('BonusPeriods', 'EmpevalBonusPeriods', RelationMap::MANY_TO_ONE, array('bonus_period_id' => 'id', ), null, null);
        $this->addRelation('Users', 'EmpevalUsers', RelationMap::MANY_TO_ONE, array('editor_id' => 'id', ), null, null);
        $this->addRelation('UserPositions', 'EmpevalUserPositions', RelationMap::MANY_TO_ONE, array('user_position_id' => 'id', ), null, null);
        $this->addRelation('Rejections', 'EmpevalRejections', RelationMap::ONE_TO_ONE, array('id' => 'bonus_goals_form_id', ), null, null);
        $this->addRelation('MboGoals', 'EmpevalMboGoals', RelationMap::ONE_TO_MANY, array('id' => 'bonus_goals_form_id', ), null, null, 'MboGoalss');
        $this->addRelation('Summary', 'EmpevalSummary', RelationMap::ONE_TO_MANY, array('id' => 'bonus_goals_form_id', ), null, null, 'Summarys');
        $this->addRelation('EmployeeEvaluations', 'EmpevalEmployeeEvaluations', RelationMap::ONE_TO_ONE, array('id' => 'bonus_goals_form_id', ), null, null);
        $this->addRelation('TaskGoals', 'EmpevalTaskGoals', RelationMap::ONE_TO_MANY, array('id' => 'bonus_goals_form_id', ), null, null, 'TaskGoalss');
        $this->addRelation('Kpi', 'EmpevalKpi', RelationMap::ONE_TO_MANY, array('id' => 'bonus_goals_form_id', ), null, null, 'Kpis');
        $this->addRelation('Acceptance', 'EmpevalAcceptance', RelationMap::ONE_TO_MANY, array('id' => 'bonus_goals_form_id', ), null, null, 'Acceptances');
    } // buildRelations()

} // EmpevalBonusGoalsFormsTableMap
